﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Controls;
using System.Windows.Media;
using WQDSkin.Forms.Controls.Help;

namespace WQDSkin.Forms.Controls
{
    public static class ControlExtensions
    {
        public static void SetOverBrush(this Control control)
        {
            SolidColorBrush colorBrush = (SolidColorBrush)control.Background;

            SolidColorBrush mouseOverBackGround = new SolidColorBrush(WQDSystemColors.ChangeColor(colorBrush.Color, (float)-0.08));
            ButtonHelp.SetMouseOverBackground(control, mouseOverBackGround);

            Brush mouseOverBorder = new SolidColorBrush(WQDSystemColors.ChangeColor(((SolidColorBrush)control.BorderBrush).Color, (float)-0.14));
            ButtonHelp.SetMouseOverBorder(control, mouseOverBorder);

        }
    }
}
